package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 交易流水表
 * </p>
 *
 * @author xiangnick
 * @since 2018-01-11
 */
@TableName("shop_journal")
public class Journal extends Model<Journal> {

    private static final long serialVersionUID = 1L;

    /**
     * 交易流水id
     */
	private String id;
    /**
     * 消费的会员id
     */
	@TableField("member_id")
	private String memberId;
    /**
     * 门店id
     */
	@TableField("branch_id")
	private String branchId;
    /**
     * 店面名称
     */
	@TableField("branch_name")
	private String branchName;
    /**
     * 优惠券id，为uuid
     */
	@TableField("coupon_id")
	private String couponId;
    /**
     * 优惠券名称
     */
	@TableField("coupon_name")
	private String couponName;
    /**
     * 优惠券码号，为纯数字
     */
	@TableField("coupon_no")
	private String couponNo;
    /**
     * 优惠券使用数量
     */
	@TableField("coupon_count")
	private Integer couponCount;
    /**
     * 商户id
     */
	@TableField("shop_id")
	private String shopId;
    /**
     * 卡号哈希值
     */
	@TableField("card_hash")
	private String cardHash;
	@TableField("create_time")
	private Date createTime;
    /**
     * 原始金额
     */
	@TableField("origin_amount")
	private BigDecimal originAmount;
    /**
     * 优惠后金额
     */
	@TableField("discount_amount")
	private BigDecimal discountAmount;
    /**
     * 确认交易时间
     */
	@TableField("trade_time")
	private Date tradeTime;
    /**
     * 状态：0 未确认交易；1 确认交易；
     */
	private Integer status;
    /**
     * 备注
     */
	private String remark;
    /**
     * 本次使用预充值金额
     */
	@TableField("balance_cost")
	private BigDecimal balanceCost;
    /**
     * 本次消费后，预充值账户剩余余额
     */
	private BigDecimal balance;
    /**
     * 充值账号使用记录
     */
	@TableField("charge_journal_detail")
	private String chargeJournalDetail;


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public String getBranchId() {
		return branchId;
	}

	public void setBranchId(String branchId) {
		this.branchId = branchId;
	}

	public String getBranchName() {
		return branchName;
	}

	public void setBranchName(String branchName) {
		this.branchName = branchName;
	}

	public String getCouponId() {
		return couponId;
	}

	public void setCouponId(String couponId) {
		this.couponId = couponId;
	}

	public String getCouponName() {
		return couponName;
	}

	public void setCouponName(String couponName) {
		this.couponName = couponName;
	}

	public String getCouponNo() {
		return couponNo;
	}

	public void setCouponNo(String couponNo) {
		this.couponNo = couponNo;
	}

	public Integer getCouponCount() {
		return couponCount;
	}

	public void setCouponCount(Integer couponCount) {
		this.couponCount = couponCount;
	}

	public String getShopId() {
		return shopId;
	}

	public void setShopId(String shopId) {
		this.shopId = shopId;
	}

	public String getCardHash() {
		return cardHash;
	}

	public void setCardHash(String cardHash) {
		this.cardHash = cardHash;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public BigDecimal getOriginAmount() {
		return originAmount;
	}

	public void setOriginAmount(BigDecimal originAmount) {
		this.originAmount = originAmount;
	}

	public BigDecimal getDiscountAmount() {
		return discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	public Date getTradeTime() {
		return tradeTime;
	}

	public void setTradeTime(Date tradeTime) {
		this.tradeTime = tradeTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public BigDecimal getBalanceCost() {
		return balanceCost;
	}

	public void setBalanceCost(BigDecimal balanceCost) {
		this.balanceCost = balanceCost;
	}

	public BigDecimal getBalance() {
		return balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

	public String getChargeJournalDetail() {
		return chargeJournalDetail;
	}

	public void setChargeJournalDetail(String chargeJournalDetail) {
		this.chargeJournalDetail = chargeJournalDetail;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Journal{" +
			"id=" + id +
			", memberId=" + memberId +
			", branchId=" + branchId +
			", branchName=" + branchName +
			", couponId=" + couponId +
			", couponName=" + couponName +
			", couponNo=" + couponNo +
			", couponCount=" + couponCount +
			", shopId=" + shopId +
			", cardHash=" + cardHash +
			", createTime=" + createTime +
			", originAmount=" + originAmount +
			", discountAmount=" + discountAmount +
			", tradeTime=" + tradeTime +
			", status=" + status +
			", remark=" + remark +
			", balanceCost=" + balanceCost +
			", balance=" + balance +
			", chargeJournalDetail=" + chargeJournalDetail +
			"}";
	}
}
